package com.team.cloudsharing.ultis;

public class S3Util {
	public static String convertDocumentPathAndNameToFullPathForS3(String userEmail, String documentPath, String documentName, int documentType) {
		if (documentType == Constant.DOC_FILE) {
			if (documentPath.isEmpty()) {
				return userEmail + Constant.SUFFIX + documentName;
			} else {
				return userEmail + Constant.SUFFIX + documentPath + Constant.SUFFIX + documentName;
			}
		} else if (documentType == Constant.DOC_FOLDER) {
			if (documentPath.isEmpty()) {
				return userEmail + Constant.SUFFIX + documentName + Constant.SUFFIX;
			} else {
				return userEmail + Constant.SUFFIX + documentPath + Constant.SUFFIX + documentName + Constant.SUFFIX;
			}
		}
		return "";
	}
}
